Filer_Opendir Mem#adfs;;4.$.MemDisc:$
Note the semicolons - they are important. This is useful if you need
to use long file names or many files in a directory. Notice that
it may take memfs up to 3 seconds after use before the disc is updated.
Each file is compressed by the Acorn "Squash" module in ROM.
*** Note that 2.xx is incompatible with previous versions, so discard any
saved sprite areas you may have.
As of MemFS 2.10 I recommend using the !X-files filing system for disc storage - MemFS slave FS was never very reliable, and was very inefficient. X-files can be found at ftp://micros.hensa.ac.uk/micros/arch/riscos/e/e127/
It is ideal for use as a scrap device - this is not set by default in the !Run file, but users who want this feature can easily enable it by editing the !Run file.
Start by running the memfs application, then use it like the ramdisc, except it can be resized with stuff in. It will not work under RISCOS 2.
I am pretty sure that this works, but there may well still be bugs, so please don't commit irreplaceable data to it!
*access, *info, *fileinfo
, Open
*CAT/*EX
output
The error message "Lost inode" means that MemFS was unable to find a sprite
it expected to. It will use any file structure that it finds already present
when it is loaded, so if you want you can save the entire contents with
*ssave, and load it again with *sload
.
The memfs and memfsfiler modules should work ok when loaded outside the Wimp, and behave as a standard fs/filer pair. The filer needs a sprite called memfs in the wimp sprite pool. Of course, it will be difficult to extend the sprite area when anything is running in single tasking mode.
Some suboptimal algorithms. Unsorted directories are searched linearly :-(
The sources-distribution of memfs comes with 'FSLib' which is an ALF library that provides a very easy interface for writing FileSwitch filing systems. See FSLib docs for more details.
The idea of using the sprite area as a dynamic method of allocating space came to Nicko Van Someren, in a flash of insight during a conversation we had. This was several months after I had given up on an attempt at this using the ramfs dynamic area due to the evil that riscos perpetrates when one calls ChangeDynamic area on that, and settled for the horrible solution of the RMA, which would never shrink.
It is dedicated to debugging via printf :-(
PLEASE don't send me such unhelpful comments! Really, I need to know as much of the following as you can provide in the initial email;
I am not asking for money, but if you like and use it I would be surprised and amazed by any contributions, and you will receive a disc with latest versions on. (>£10, say)
Brian Brunswick bdb@eidos.co.uk (Internet) Fairview Avenue des Hirondelles Pool-in-WharfeDale Leeds LS21 1EY
Please email or snail-mail me comments, bug reports, requests for new features, etc. and I will hopefully have the time to deal with them. If you make any modifications to the code, please send them to me rather than giving out copies - I would like to coordinate new releases. Thanks.
I can be contacted at the following address:
Nick Smith nas@bi.org (Internet email) ANT Ltd http://bi.org/~nas/ PO Box 300 Cambridge CB1 2EG
With RISCOS_Lib becoming more and more depreciated, I will start (as time allows) to change over to either my own library code or use something like the wonderful OSLib.
Feel free to contact me at
Paul F. Johnson paulf.johnson@ukonline.co.uk 77 Station Road http://www.acornusers.org/cbsa/ Haydock St. Helens WA11 0JL
If you decide to send any donations for the upkeep, please make them payable to RISC OS Charity Projects.
Modifications to v2.01 (30-Mar-93)
- Improved documention; added installation instructions, updated info,
added revision history, etc
- removed compilation dependency on having brian's harddrive 8-)
- did some slightly better !Sprites, with !Sprites22
Modifications to v2.02 (04-Apr-93)
- Large amount of work done to filer (no separate history) Loads of
new features, including; info dbox, create dbox for easy creation
of memdisc files on disc (uses dragasprite!), doesn't do *snew
upon quit anymore but just deletes memfs sprite files, filer windows
closed when memfsfiler quit, desktop save support (saves spritearea
to scrap file inside !Memphis), can adjust click on menu, etc ...
- MemFSFiler made RO 2.00 incompatible, but it is worth it!
- Mods to MemFS sources to get compiling with new FSLib code, still
some work required for it to actually function though !
- Memphis found in Tennessee, USA ;-)
Modifications to v2.03 (15-May-93)
- Got new memfs sources from bdb - now compiles & runs happily with
latest fslib. desktop free support broken ...
- Fixed freespace (needed enabling from fslib sources)
Modifications to v2.04 (06-Jul-93)
- Fixed templates file
- New 3D-look templates - autoloads correct one based on setting of
'3D look' CMOS byte
- Sent filetype/FS number allocation request to Acorn Customer Support
Modifications to v2.05 (12-Aug-93)
- Improved documentation + reorganized 'todo' file for next public
release version
- Emailed Acorn customer services regarding distribution of FSLib
sources + patched cmhg program
- Enabled query message on quit of memfiler when there is data in the
sprite area
- Shaved around 2-3Kb off the combined module size by recompiling with
'-ff' (no embedded function names). Also done with 'FSLib' library.
- Can now drag objects from the filer straight onto the memfs icon and
they are copied (or moved with shift) using m/tasking filer_action
- Filer now has integrated Darren Durbin's 'LockSNEW' module which
filters out dangerous *SNew and *Sload commands. Can toggle filtering
on/off with *MemProtect/*MemNormal
Modifications to v2.06 (22-Aug-93)
- Got permission to distribute FSLib code from Acorn (yipee!) copyright
and disclaimer notices added
- Patch program for cmhg tool added + docs, because we aren't allowed
to distribute Acorn binaries without a license
Modifications to v2.07 (24-Aug-93)
- Got an Acorn-allocated FS number (91) and Filetype (&3f1)
Modifications to v2.08 (08-Sep-93) [release]
- Fixed dragasprite (was looking at wrong CMOS bit)
- Corrected memcore filetype
- Got a whole load of new code from Brian - what am I going to do??!
- Fixed major bug in compressed pages code
- Added (c) messages to each source file
ReFormatted all text files to Mode 12 screen
Improved documentation a little
- Fixed bug with saveas dbox (3D version) *must* be 'Click', not
'Click+Drag' icon type for OK icon
- Vastly improved page compression/decompression routines, and fixed
uncompress (I hope!) to stop it bombing out filer_action ...
- Strange problem with system() screwing up Life As We Know It in
memfiler - using OS_CLI instead seems to cure the problem!
Modifications to v2.09 (15-Sep-93)
- Pulled templates out of ResourceFS - saves about 2Kb from filer
module size
- Added new code to drag sprite on iconbar. Try dragging, drag+SHIFT
and drag+CTRL held down
Modifications to v2.10 (14-Oct-96)
- Updated contact details for myself & Brian (long out of date!)
- Recompiled with CallASWI module which replaced the dynamic SWI
code in FSLib.s.swiv
- Actually use _kernel_swi() instead of CallASWI (so no dependency on
extra modules)
- Now with new 'create' dbox with cancel button (RO3 style guide)
- Create "X-files" files from Create-> menu, not old Memphis (broken)
files. This requires the !X-files package to be useful of course,
but it is a far far better long filenames/lots of files FS for disc
use than Memphis ever was
- Checks for X-file archive already existing before allowing 'create'
(don't want to wipe out entire archives so easily!)
Modifications to v2.11 (13-Feb-97)
- Tidying of documentation
- Added warning on predesk shutdown if data in sprite area
Modifications to v2.12 (11-Mar-01)
- Altered for OS 4 and OS 3 sprite sets.
- fixed small memory leak (and I mean *small*)